import request from '@/utils/requestUtil'

// 获取所有活动
export function getAllNews() {
	return request({
		method: 'GET',
		url: '/creditWarning/activity/list',
		header: {
			'content-type': 'application/json;charset=utf-8'
		},
		params: {
			status: 1
		}
	})
}

// 报名活动
export function signup(data) {
	return request({
		method: 'POST',
		url: '/creditWarning/activitysignup',
		header: {
			'content-type': 'application/json;charset=utf-8'
		},
		data: data
	})
}

// 获取用户的分数
export function getCredit(userId) {
	return request({
		method: 'GET',
		url: '/creditWarning/usercredit/getCredit/' + userId,
		header: {
			'content-type': 'application/json;charset=utf-8'
		}
	})
}